home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Converters / Convert_MacPaint / Source / shared.subproj / RCS / AbstractConverter.m,v < prev    next >
Text File  |  1995-06-12  |  4KB  |  123 lines

  1. head     1.3;
  2. branch   ;
  3. access   ;
  4. symbols  beta10:1.2;
  5. locks    death:1.3;
  6. comment  @@;
  7.  
  8.  
  9. 1.3
  10. date     93.04.04.23.44.10;  author death;  state Exp;
  11. branches ;
  12. next     1.2;
  13.  
  14. 1.2
  15. date     93.01.10.15.07.32;  author death;  state Exp;
  16. branches ;
  17. next     1.1;
  18.  
  19. 1.1
  20. date     92.07.26.13.56.41;  author death;  state Exp;
  21. branches ;
  22. next     ;
  23.  
  24.  
  25. desc
  26. @Serves as a basic primitive converter object...
  27. @
  28.  
  29.  
  30. 1.3
  31. log
  32. @Sun Apr  4 23:44:10 PDT 1993
  33. @
  34. text
  35. @#import "AbstractConverter.h"
  36.  
  37. @@implementation AbstractConverter
  38.  
  39.  
  40. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  41. //    Method:        init
  42. //    Parameters:    none
  43. //    Returns:     none
  44. //    Stores:        none
  45. //    Description:
  46. //        Initalizes an instance... namely by defining th manager instance as null
  47. //    Bugs:
  48. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  49. - init
  50. {
  51.     myManager = NullInstance;
  52.     return self;
  53. }
  54.  
  55.  
  56. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  57. //    Method:        ReportTo:
  58. //    Parameters:    The caller
  59. //    Returns:     none
  60. //    Stores:        none
  61. //    Description:
  62. //        ConvertController's use this to tell the converter what object to report status
  63. //        to.  That is, we must tell sender when we are, for example, 50% of the way
  64. //        done so it can let the user know what's going on.  Subclasses should have no
  65. //        need of subclassing this.  It will always be set up before a call to the main
  66. //        conversion routine.
  67. //    Bugs:
  68. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  69. - ReportTo: sender
  70. {
  71.     myManager = sender;
  72.     return self;
  73. }
  74.  
  75.  
  76. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  77. //    Method:        isThisAGoodFile:
  78. //    Parameters:    A File instance
  79. //    Returns:     YES if it is, NO if it isn't.
  80. //    Stores:        none
  81. //    Description:
  82. //        A converter, in addition to converting a file X to a file Y, should be able to
  83. //        identify when a source file is a legitimate file for conversion.  In the case of
  84. //        this abstract class, this method does nothing.  A subclass, however, will
  85. //        subclass this method and have it examine the specified file, and determine
  86. //        if it's a legit file or not.  It returns YES if the file is good, or NO if the file is
  87. //        questionable or bad.  
  88. //    Bugs:
  89. //        We need to use the proposed Fact datatype here, instead of Boolean.
  90. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  91. - (Boolean) isThisAGoodFile: Instance
  92. {
  93.     return YES;
  94. }
  95.  
  96.  
  97. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  98. //    Method:        some conversion routine
  99. //    Description:
  100. //        Additionally, subclasses will want to include a routine to convert stuff
  101. //        here. =)
  102. //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  103.  
  104. @@end
  105.  
  106. @
  107.  
  108.  
  109. 1.2
  110. log
  111. @Sun Jan 10 15:07:32 PST 1993
  112. @
  113. text
  114. @@
  115.  
  116.  
  117. 1.1
  118. log
  119. @Initial revision
  120. @
  121. text
  122. @@
  123.